<?php
	function displayDetail($anndetail, $comment) {
	
		if(!empty($anndetail)) {
			foreach($anndetail as $annd) {
				$annTitre = $annd['ANN_TITRE'];
				$annDesc = $annd['ANN_DESC'];
				$annDate = $annd['ANN_DATE_CREA'];
				$annPrix = $annd['ANN_PRIX'];
				$annVD = $annd['ANN_VILLE_DEP'];
				$annVA = $annd['ANN_VILLE_ARR'];
				$annType = $annd['ANN_TYPE_ID'];
				$annTrans = $annd['ANN_MODE_TRANS'];
				
				if($annType == 1)
					$annType = "Exp&eacute;dition";
				else 
					$annType = "Accompagnement";
			}
		}
?>			
				<div class="rectl">
					<div class="inside">
						<h1><?php echo ucfirst($annTitre); ?></h1>
						<p />
						<hr />
						<div style="min-height: 70px; text-align: justify;"><?php echo ucfirst($annDesc); ?></div>
						<p />
						<hr />
						<div>
							<table style="width:100%;">
								<tr>
									<td style="width:50%">
										<table style="width:100%;">	
											<tr>
												<td style="width:50%; font-weight: bold;">En ligne depuis</td><td style="width:50%"><?php echo $annDate ?></td>
											</tr>
											<tr>
												<td style="width:50%; font-weight: bold;">D&eacute;part</td><td style="width:50%"><?php echo $annVD ?></td>
											</tr>
											<tr>
												<td style="width:50%; font-weight: bold;">Destination</td><td style="width:50%"><?php echo $annVA ?></td>
											</tr>
										</table>
									</td>
									<td style="width:50%">
										<table style="width:100%;">	
											<tr>
												<td style="width:50%; font-weight: bold;">Type d'annonce</td><td style="width:50%"><?php echo $annType ?></td>
											</tr>
											<tr>
												<td style="width:50%; font-weight: bold;">Prix</td><td style="width:50%"><?php echo $annPrix ?></td>
											</tr>
											<tr>
												<td style="width:50%;  font-weight: bold;">Mode d'envoi</td><td style="width:50%"><?php echo $annTrans ?></td>
											</tr>
												</td>
												<td style="width:50%"></td>
											</tr>
										</table>
									</td>
								<tr>
							</table>
						</div>
						<p />
						<hr />
						<div>
							<table>
								<tr>
									<td><img src="view/design/images/social/facebook.png" title="Partager sur facebook" /></td>
									<td><img src="view/design/images/social/twitter.png" title="Partager sur twitter" /></td>
									<td><img src="view/design/images/social/googleplus.png" title="Partager sur google+" /></td>
									<td>&nbsp;</td>
									<td>Commentaires :</td>
									<td>0</td>
									<td>&nbsp;</td>
									<td>&nbsp;</td>
									<td>Avis :</td>
									<td>0</td>
									<td>&nbsp;</td>
									<td><img src="view/design/images/common/edit.png" title="Modifier cette annonce" /></td>
									<td>&nbsp;</td>
									<td><img src="view/design/images/common/trash.gif" title="Supprimer cette annonce" /></td>
									<td>&nbsp;</td>
									<td><img src="view/design/images/common/mail.png" title="Partager par mail" /></td>
								</tr>
							</table>
						</div>
						
					</div>
				</div>
<?php			
	}
	include(dirname(__FILE__) . '../../view/menu.php');
	displayDetail($anndetail, $comment);
?>	